//
// CFastPtrListBase.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CFastPtrListBase {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CFastPtrListBase(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CFastPtrListBase obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CFastPtrListBase(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CFastPtrListBase() {
    this(nel3dJNI.new_CFastPtrListBase__SWIG_0(), true);
  }

  public CFastPtrListBase(CFastPtrListBase arg0) {
    this(nel3dJNI.new_CFastPtrListBase__SWIG_1(CFastPtrListBase.getCPtr(arg0), arg0), true);
  }

  public void insert(SWIGTYPE_p_void element, CFastPtrListNode node) {
    nel3dJNI.CFastPtrListBase_insert(swigCPtr, this, SWIGTYPE_p_void.getCPtr(element), CFastPtrListNode.getCPtr(node), node);
  }

  public void erase(CFastPtrListNode node) {
    nel3dJNI.CFastPtrListBase_erase(swigCPtr, this, CFastPtrListNode.getCPtr(node), node);
  }

  public SWIGTYPE_p_p_void begin() {
    long cPtr = nel3dJNI.CFastPtrListBase_begin(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_p_void(cPtr, false);
  }

  public long size() {
    return nel3dJNI.CFastPtrListBase_size(swigCPtr, this);
  }

  public boolean empty() {
    return nel3dJNI.CFastPtrListBase_empty(swigCPtr, this);
  }

  public void clear() {
    nel3dJNI.CFastPtrListBase_clear(swigCPtr, this);
  }

  public CFastPtrListBase assign(CFastPtrListBase arg0) {
    return new CFastPtrListBase(nel3dJNI.CFastPtrListBase_assign(swigCPtr, this, CFastPtrListBase.getCPtr(arg0), arg0), false);
  }

}
